let  popup = document.querySelector(".popup");
let popupBg = document.querySelector(".popupBg");

let popupLeft = document.querySelectorAll(".popupLeft div");
let popupRight = document.querySelectorAll(".popupRight div");

function mouseOver(x){
    x.style.display = 'block';
}
function mouseOut1(x) {
    x.style.display = 'none';
}
function mouseOut(x,y){
    x.style.display = 'none';
    for(let content of y){
        content.style.backgroundColor = '#fff';
        content.style.color= 'rgba(0, 0, 0, 0.7)' ;
    }
}
popupLeft.forEach((items ,index) =>{
    popupLeft[index].onmouseover = function (){
        for(let content of popupLeft){
            content.style.backgroundColor = '#fff';
            content.style.color= 'rgba(0, 0, 0, 0.7)' ;
        }
        for(let content of popupRight){
            content.style.display = 'none';
        }
        popupLeft[index].style.color= '#000' ;
        popupLeft[index].style.backgroundColor = '#f6f6f6';
        popupRight[index].style.display = 'block';
    }
})

//智能办公弹窗
let hotActPopup = document.querySelector(".hotActPopup");

hotActPopup.onmouseover = function (){
    hotActPopup.style.display = 'block';
}

//解决方案弹窗
let solutionPopup = document.querySelector(".solutionPopup");
let solutionPopupA = document.querySelectorAll(".solutionPopupA");

solutionPopupA.forEach((items,index) =>{
    solutionPopupA[index].onmouseover = function (){
        for(let content of solutionPopupA){
            content.style.backgroundColor = '#fff';
            content.style.color= 'rgba(0, 0, 0, 0.7)' ;
        }
        this.style.color = '#005EFF';
        this.style.backgroundColor = '#f6f6f6';
    }
})
/*支持与服务弹窗*/
let supportPopup = document.querySelector(".supportPopup");
let supportPopupA = document.querySelectorAll(".supportPopupA");


supportPopupA.forEach((items,index) =>{
    supportPopupA[index].onmouseover = function (){
        for(let content of supportPopupA){
            content.style.backgroundColor = '#fff';
            content.style.color= 'rgba(0, 0, 0, 0.7)' ;
        }
        items.style.color = '#005EFF';
        items.style.backgroundColor = '#f6f6f6';
    }
})
// 中文弹窗
let chinaPopup = document.querySelector(".chinaPopup");
let chinaPopupA = document.querySelectorAll(".chinaPopupA");

chinaPopupA.forEach( (items,index) =>{
    chinaPopupA[index].onmouseover = function (){
        for(let content of chinaPopupA){
            content.style.backgroundColor = '#fff';
            content.style.color= 'rgba(0, 0, 0, 0.7)' ;
        }
        items.style.color = '#005EFF';
        items.style.backgroundColor = '#f6f6f6';
    }
})



    let checkEnterprise=document.querySelector(".checkEnterprise");
    let checkBoss=document.querySelector(".checkBoss");
    let inp=document.querySelector(".inp");
    let recommend=document.querySelector(".recommend");
    let finance=document.querySelector(".finance");
    let born=document.querySelector(".born");
    let financeCon=document.querySelector(".financeCon");
    let leftCon=document.querySelector(".left-con");
    let recommendCon=document.querySelector(".recommendCon");
    let arRightbot=document.querySelector(".ar-right-bot");
    let arRightbot2=document.querySelector(".ar-right-bot2");
    let hotBoss=document.querySelector(".hotBoss");
    let hotEnterprise=document.querySelector(".hotEnterprise");

    checkBoss.onclick=function (){
    checkBoss.style.color="#0077FF";
    checkEnterprise.style.color="black";
    inp.placeholder="请输入老板姓名,比如“马云 杭州”";
}
    checkEnterprise.onclick=function (){
    checkBoss.style.color="black";
    checkEnterprise.style.color="#0077FF";
    inp.placeholder="请输入公司名称,老板姓名";
}
    recommend.onclick=function (){
        recommend.style.borderBottom="2px solid #0077FF";
        finance.style.borderBottom="none";
        born.style.borderBottom="none";
        recommendCon.style.display="block";
        financeCon.style.display="none";
    }
    finance.onclick=function (){
        finance.style.borderBottom="2px solid #0077FF";
        recommend.style.borderBottom="none";
        born.style.borderBottom="none";
        financeCon.style.display="block";
        recommendCon.style.display="none";
    }
    born.onclick=function (){
        born.style.borderBottom="2px solid #0077FF";
        finance.style.borderBottom="none";
        recommend.style.borderBottom='none';
    }
    hotBoss.onclick=function (){
        hotBoss.style.borderBottom="2px solid #0077FF";
        arRightbot.style.display="none";
        arRightbot2.style.display="block";
        hotEnterprise.style.borderBottom="none";
    }
    hotEnterprise.onclick=function (){
        hotEnterprise.style.borderBottom="2px solid #0077FF";
        hotBoss.style.borderBottom="none";
        arRightbot.style.display="block";
        arRightbot2.style.display="none";
        hotEnterprise.style.color="#hotEnterprise"
    }
